import { useState } from 'react';

export const useThemeModel = () => {
  const [isDark, setIsDark] = useState(false);

  const toggleTheme = () => {
    setIsDark(!isDark);
  };

  return {
    isDark,
    toggleTheme,
  };
};
// 指定命名空间
useThemeModel.namespace = 'useThemeModel';